package com.gzx.plugin.tjzy.modular.gzxcase.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.TransPojo;
import com.gzx.plugin.tjzy.modular.gzxcase.entity.GzxCase;
import com.gzx.plugin.tjzy.modular.project.entity.ProjectEntity;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import vip.xiaonuo.common.sensitive.annotation.Sensitive;
import vip.xiaonuo.common.sensitive.core.SensitiveStrategy;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;


/**
 * 案件列视图对象 gzx_case
 *
 * @author LionLi
 * @date 2024-09-22
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = GzxCase.class)
public class GzxCaseVo extends ProjectEntity implements Serializable, TransPojo {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 自增主键
     */
    private String id;

    /**
     * 批次号
     */
    private String batchNumber;

    /**
     * 案件状态1待分配2已分配3部分结清4已结清
     */
    @Trans(type = TransType.DICTIONARY, key = "CASE_STATUS")
    private Integer caseStatus;

    /**
     * 借款人姓名
     */
    private String debtorName;

    /**
     * 借款人手机号 TODO:敏感信息
     */
    @Sensitive(strategy = SensitiveStrategy.PHONE)
    private String debtorPhone;

    /**
     * 借款人身份证号 TODO:敏感信息
     */
    @Sensitive(strategy = SensitiveStrategy.ID_CARD)
    private String debtorCardId;

    /**
     * 用户标签
     */
    @Trans(type = TransType.DICTIONARY, key = "IntentTag", ref = "intentTagName")
    private Integer intentTag;

    @TableField(exist = false)
    private String intentTagName;

    /**
     * 总借款金额
     */
    private BigDecimal loanAmount;

    /**
     * 总逾期金额
     */
    private BigDecimal overdueAmount;

    /**
     * 应催总金额
     */
    private BigDecimal cleanLoanAmount;

    /**
     * 所属公司
     */
    @Trans(type = TransType.RPC, targetClassName = "vip.xiaonuo.sys.modular.org.entity.SysOrg", fields = "name", alias = "affiliatedCompany", ref = "affiliatedCompanyName", serviceName = "snowy-web-app")
    private Long affiliatedCompany;

    /**
     * 所属公司
     */
    private String affiliatedCompanyName;

    /**
     * 调解员姓名
     */
    private String mediatorName;

    /**
     * 甲方系统唯一ID
     */
    private String partnerBusinessId;

    //今天是否沟通过
    private Integer isTodayCall;
}
